package com.ruoyi.mine.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.constraints.NotNull;
import java.time.LocalDate;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ProductionUploadDTO {

    public interface Upload {
    }

    @NotNull(groups = {Upload.class},  message = "矿山生产数据文件不能为空")
    private MultipartFile file;

    @NotNull(groups = {Upload.class}, message = "矿山ID不能为空")
    private String mineId;

    @NotNull(groups = {Upload.class}, message = "矿山生产数据名称不能为空")
    private String layerName;

    @NotNull(groups = {Upload.class}, message = "矿山生产数据类型不能为空")
    private String produceType;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @NotNull(groups = {Upload.class}, message = "矿山生产数据生产时间不能为空")
    private LocalDate produceTime;

    @NotNull(groups = {Upload.class}, message = "矿山生产数据文件类型不能为空")
    private String fileType;

    @NotNull(groups = {Upload.class}, message = "EPSG编号不能为空")
    private Integer epsgCode;

    private String minioFileName;

    private String minioBucketName;

}
